package com.steak.javase.interfaces;

import java.util.function.Supplier;

/**
 * @author 刘牌
 * @Title:
 * @date 2022/3/2623:37
 */
public class SupplierTest {
    public static void main(String[] args) {
        String str = getStr(() -> "hello");
        System.out.println(str);
    }

    public static <T> T getStr(Supplier<T> supplier){
        return supplier.get();
    }
}
